package widget.common.utils
{
	import flash.filters.ColorMatrixFilter;
	import flash.filters.DropShadowFilter;
	import flash.filters.GlowFilter;
	import flash.text.TextField;
	
	public class FilterUtil
	{
		public static function textGlow(text:TextField):void{
			var color:Number = 0x000000;
			var alpha:Number = 1;
			var blur:Number = 5;
			var strength:Number = 5; 
			var glowFilter:GlowFilter = new GlowFilter(color,alpha,blur,blur,strength);
			text.filters = [glowFilter];
		}
		
		/**
		 * 灰度滤镜 
		 * @return 
		 * 
		 */		
		public static function ashFilter():ColorMatrixFilter{
			var mat:Array = [0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0,0,0,1,0];
			return  new ColorMatrixFilter(mat);
		}
		
		public static function getShadowFilter():DropShadowFilter{
			return new DropShadowFilter(1,90,0xffffff,0.5,0,0,0.5);
		}

	}
}